package cn.crex1.springboot.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**  
* <p>title: Application</p>  
* <p>description: </p>  
* @author zzh  
* @date 2018年7月18日  
*/
@Component
//classpath下导入properties文件
//@PropertySource("classpath:application-p.properties")
public class Application {
	
//	@Value("${cn.crex1.springboot.pojo.application.name}")
	@Value("${name}")
	private String name;
	//给属性赋值注解 ${xxx} 从外部properties文件中取值
//	@Value("${cn.crex1.springboot.pojo.application.title}")
	@Value("${title}")
	private String title;
	
	@Value("${rint}")
	private Integer rint;
	
	@Value("${rlong}")
	private Long rlong;
	
	@Value("${rvalue}")
	private String rvalue;
	
	@Value("${rrint}")
	private Integer rrint;
	
	@Value("${rrlong}")
	private Long rrlong;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	
	public Integer getRint() {
		return rint;
	}
	public void setRint(Integer rint) {
		this.rint = rint;
	}
	public Long getRlong() {
		return rlong;
	}
	public void setRlong(Long rlong) {
		this.rlong = rlong;
	}
	public String getRvalue() {
		return rvalue;
	}
	public void setRvalue(String rvalue) {
		this.rvalue = rvalue;
	}
	public Integer getRrint() {
		return rrint;
	}
	public void setRrint(Integer rrint) {
		this.rrint = rrint;
	}
	public Long getRrlong() {
		return rrlong;
	}
	public void setRrlong(Long rrlong) {
		this.rrlong = rrlong;
	}
	@Override
	public String toString() {
		return "Application [name=" + name + ", title=" + title + ", rint=" + rint + ", rlong=" + rlong + ", value="
				+ rvalue + ", rrint=" + rrint + ", rrlong=" + rrlong + "]";
	}
	
}
